<template>
  <div class="test-container">
    <Pager
      :total="total"
      :limit="limit"
      :current="current"
      :visibleNumber="visibleNumber"
      @pageChange="handlePageChange($event)"
    ></Pager>
  </div>
</template>

<script>
import Pager from "./";
export default {
  name: "Test",
  components: {
    Pager,
  },
  data() {
    return {
      total: 302,
      limit: 10,
      current: 1,
      visibleNumber: 10,
    };
  },
  methods: {
    handlePageChange(newPage) {
      this.current = newPage;
      console.log(newPage);
    },
  },
};
</script>

<style lang="less" scoped>
.test-container {
  margin: 0;
  padding: 50px 0 50px 0;
  border-top: 2px solid #6b9eee;
  border-bottom: 2px solid #6b9eee;

  a {
    text-decoration: none;
  }
}
</style>